#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from dragon.selector import Selector
from pages.stocktrack5 import StockTrackPage5
from dragon.page import DraPage

class SubscribeSe:
        searchInput=Selector('input.search-input','搜索框')
        # 排序按钮
        sortButton=Selector('div.sort>div','排序按钮')
        sortIcon=Selector('div.sort.df.jcsb > div > div > svg > use', '排序图标')
        # 股票列表
        changeCount = Selector('.demo6-item-moneyNum>span:nth-child(2)', '异动次数')
        realtimeIncrease = Selector('.demo6-shishi :text("%")', '实时涨幅')
        changeTime = Selector('.demo6-item-BkName :text(":")', '异动时间')



class SubscribePage(StockTrackPage5):
    def __init__(self, draPage: DraPage):
        super().__init__(draPage)
        self.searchInput = draPage.locator(SubscribeSe.searchInput)
        self.sortButton = draPage.locator(SubscribeSe.sortButton)
        self.sortIcon = draPage.locator(SubscribeSe.sortIcon)
        self.changeCount = draPage.locator(SubscribeSe.changeCount)
        self.realtimeIncrease = draPage.locator(SubscribeSe.realtimeIncrease)
        self.changeTime = draPage.locator(SubscribeSe.changeTime)
